/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jsalon.web.controller;

import jamjun.infra.lang.JJString;
import jamjun.infra.model.SelectItemViewModel;
import jamjun.infra.model.SelectListViewModel;
import jamjun.infra.web.Controller;
import jamjun.infra.web.GSession;
import jamjun.infra.web.Json;
import jamjun.infra.web.Result;
import jamjun.infra.web.el.SelectCaption;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jsalon.enumtype.Gender;
import jsalon.web.vm.CustomerVM;
import jsalon.cls.SelectList;

/**
 *
 * @author Java
 */
@WebServlet(name = "jsonSelect", urlPatterns = {"/jsonSelect"})
public class JsonSelectController extends Controller {
    public static Result gender()
    {
        //<editor-fold desc="parameter">
        String selectedID = GSession.Request.getParameter("selectedID");
        SelectCaption selectCaption = SelectCaption.valueOf(GSession.Request.getParameter("selectCaption"));
        //</editor-fold>
        //<editor-fold desc="code">
        SelectList selectList = new SelectList();
        Json items = selectList.GetGender(selectedID, selectCaption);
        //</editor-fold>
        return new Json(items);
    }

}
